SQL exclude a column using SELECT * [except columnA] FROM tableA?

Posted by uu?????s on Stack Overflow See other posts from Stack Overflow or by uu?????s
Published on 2009-04-08T09:15:28Z Indexed on 2010/04/13 5:03 UTC
Read the original article Hit count: 256

We all know that to select all columns from a table, we can use

SELECT * FROM tableA

Is there a way to exclude column(s) from a table without specifying all the columns?

SELECT * [except columnA] FROM tableA

The only way that I know is to manually specify all the columns and exclude the unwanted column. This is really time consuming so I'm looking for ways to save time and effort on this, as well as future maintenance should the table has more/less columns.

thanks!

© Stack Overflow or respective owner

Related posts about sql-server

Related posts about tsql